package list_map;

import java.util.ArrayList;
import java.util.Arrays;

/**
 * @program: javase
 * @description:
 * @author: lld
 * @create: 2021-06-04 16:11
 **/
public class Listgrow {
//    ArrayList
    public int[] grow(int[] arr){
        int old=arr.length;
        int newLen=old+(old>>1);
//        int[] newArr=new int[newLen];
        int[] newArr = Arrays.copyOf(arr, newLen);
        return newArr;

    }

    public static void main(String[] args) {
        int[] arr=new int[]{1,2,3,4,5};
        int[] grow = new Listgrow().grow(arr);
        System.out.println("Arrays.toString(grow) = " + Arrays.toString(grow));

        String s="(()()))";
        String[] split = s.split("()");
        System.out.println("Arrays.toString(split) = " + Arrays.toString(split));
        System.out.println(s.length());
    }
}
